home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 247 / 247.d81 / e.int convert < prev    next >
Text File  |  2022-08-26  |  501b  |  23 lines

  1. u                            PRINT THIS
  2.  
  3.       SIGNED INTEGER TO UNSIGNED
  4.       --------------------------
  5.  
  6.   I=I-(I<0)*65536
  7.  
  8.  
  9.   This is good for getting a useable
  10. value from FRE(0). For some strange
  11. reason, the creator of BASIC 2.0 (a
  12. guy by the name of Bill Gates) decide
  13. to punch the two-byte value of free
  14. BASIC memory into a signed integer
  15. variable. If the value is over 32787,
  16. the result appears as a negative
  17. number.
  18.  
  19.   So use the above function to fix it.
  20.  
  21.   FRE = FRE(0)-(FRE(0)<0)*65536
  22.  
  23.  
  24.